<!doctype html>
<html  class="x-admin-sm">
<head>
	<meta charset="UTF-8">
	<title>1902-3组后台登录</title>
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/login.css">
	  <link rel="stylesheet" href="./css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="./lib/layui/layui.js" charset="utf-8"></script>
    <script src="js/jquery.min.js"></script>
    <script src="js/jquery.cookie.js"></script>
   
</head>
<body class="login-bg" background="images/566d851f191ad798eeb56a1b7a02dd31.jpg">
    
    <div class="login layui-anim layui-anim-up">
        <div class="message" >三阳科技后台管理系统</div>
        <div id="darkbannerwrap"></div>
        <form method="post" class="layui-form" id="form1">
            <input name="loginName" id="loginName" placeholder="用户名"  type="text" lay-verify="required" class="layui-input" >
            <hr class="hr15">
            <input name="loginPwd" lay-verify="required" placeholder="密码"  type="password" class="layui-input">
            <hr class="hr15">
            <input value="登录" lay-submit lay-filter="login" style="width:100%;" type="button" id="btn">
            <hr class="hr20" >
        </form>
    </div>

    <script>
		$(function(){
				$("#btn").click(function(){
					$.post("http://localhost:9095/admin/sysUser/login",$("#form1").serialize(),function(msg){
						if(msg.code==200){
							var name=$("#loginName").val();
							$.cookie("name",name);
							$.cookie("token2",msg.data)
							location.href="index.html";
						}else if(msg.code==202){
							alert("您已被冻结，请联系管理员");
						}else if(msg.code==201){
							alert("用户名或密码错误");
						}
					})
				})
				
			});
    </script>
    <!-- 底部结束 -->
</body>
</html>